/******************************************************************************
 cnome: A C++ source "genes" discover. :-)

 See more details at:

   http://www.codeplex.com/cnome

 The original author site is at: http://www.alemosbarbosa.com/

 Copyright (c) 2008-2010 Alexandre Lemos Barbosa.
 Distributed under the MIT License. (See accompanying file LICENSE-MIT.txt 
 or at http://www.codeplex.com/cnome/license)
 ******************************************************************************/

#ifndef TYPEDEFS_H
#define TYPEDEFS_H

#ifdef CNOME_TRACE_ON 
#ifndef BOOST_SPIRIT_DEBUG
#define BOOST_SPIRIT_DEBUG  ///$$$ DEFINE THIS BEFORE ANYTHING ELSE $$$///
#endif
#define CNOME_DEBUG
#endif

#include <list>
#include <map>
#include <string>

#include <boost/spirit/include/classic_core.hpp>
#include <boost/spirit/include/classic_error_handling.hpp>
#include <boost/spirit/include/classic_multi_pass.hpp>
#include <spirit_cnome/rule_cnome.hpp>

#include <boost/wave.hpp>
#include <boost/wave/cpplexer/cpp_lex_iterator.hpp> // lexer class
#include <wave_cnome/cpplexer/cpp_lex_token_cnome.hpp>    // token class

#include <tst_avl.h>

namespace cnome {
using namespace boost::spirit::classic;
using namespace boost::wave;
using namespace boost::wave::cpplexer;
//using namespace cnome::wave::cpplexer;
using namespace std;

// Foward declarations
class iterator;
class symbol;

typedef cnome::wave::cpplexer::lex_token_cnm<>  
	                              token_t;
typedef lex_iterator<token_t>     lex_iterator_type;
typedef context<string::iterator, lex_iterator_type> 
                                  context_t;
typedef context_t::iterator_type  iterator_T;
typedef cnome::wave::cpplexer::token_annotation          
	                              token_annotation;
typedef cnome::wave::cpplexer::token_annotation_ptrT     
	                              token_annotation_ptrT;
typedef list<token_t>             adornersT;
typedef adornersT::iterator       it_adornersT;
typedef boost::shared_ptr<symbol> 
                                  symbolPtr;
typedef tst_avl::tst_avl<string, symbolPtr> 
                                  cnome_symbolsT;
typedef tst_avl::tst_avl<string, symbolPtr>::iterator 
                                  itSymbolItem;
typedef scanner<iterator>         scanner_t;
typedef cnome::spirit::classic::rule_cnome<scanner_t>     rule_t;
typedef list<symbolPtr>           scopeT;
typedef list<scopeT>		      lstScopeT;
typedef list<bool>                lstTdc;
typedef list<itSymbolItem>        lstItSblsT;
typedef scopeT::const_iterator    constItScope;
typedef lstScopeT::const_iterator constItLstScope;
typedef lstTdc::const_iterator    constItlstTdc;
typedef parser_error<const char*, iterator_T> 
                                  cnome_parser_error;
typedef list<std::size_t>         lstSizesT;

enum eParameterType {
    unknown,
    method_parameter,
    template_parameter
};
}  // namespace cnome

#endif // TYPEDEFS_H
